using System.Collections.Generic;

namespace MAP
{
    class MasterTables
    {
        public List<Table> Tables = new List<Table>();
    }

    //[DebuggerDisplay("tableID={tableID}, FunctoidID={FunctoidID}")]
    class Table
    {
        List<Columns> _rows = new List<Columns>();
        public string tableID = string.Empty;
        public string FunctoidID = string.Empty;
        public List<TableExtractor> tblExtractors = new List<TableExtractor>();

        public Columns this[int Index]
        {
            get { return _rows[Index]; }
            set { _rows[Index] = value; }
        }

        public void AddColumn(Columns C)
        {
            _rows.Add(C);
        }

        public List<Columns> Rows
        {
            get { return _rows; }
        }
    }

    struct TableExtractor
    {
        public string Pointer;
        public string FunctoidID;
        public TableExtractor(string Pointer, string FunctoidID)
        {
            this.FunctoidID = FunctoidID;
            this.Pointer = Pointer;
        }
    }

    class Columns
    {
        public List<Links> Column = new List<Links>();
    }
    
    class Rows
    {
        public  List<Columns> Column = new List<Columns>();
    }

    class Links
    {
        public Links(string columnId)
        {
            this._ColumnID = columnId;
        }

        private string _ColumnID = string.Empty;
        public string LinkTo = string.Empty;
        public string LinkFrom = string.Empty;

        public string ColumnID
        {
            set { _ColumnID = value; }
            get { return _ColumnID; }
        }
    }
}
